package org.dromara.xyyw.service;

import org.dromara.xyyw.domain.XyywShoppingCart;
import org.dromara.xyyw.domain.bo.XyywShoppingCartBo;
import org.dromara.xyyw.domain.query.XyywShoppingCartQuery;
import org.dromara.xyyw.domain.vo.XyywShoppingCartVo;
import com.baomidou.mybatisplus.extension.service.IService;
import org.dromara.common.mybatis.core.page.TableDataInfo;

import java.util.Collection;
import java.util.List;

/**
 * 购物车Service接口
 *
 * @author yf
 * @date 2024-05-29
 */
public interface IXyywShoppingCartService extends IService<XyywShoppingCart> {

    /**
     * 查询购物车
     *
     * @param shoppingCartId 主键
     * @return XyywShoppingCartVo
     */
    XyywShoppingCartVo queryById(Integer shoppingCartId);

    /**
     * 查询购物车列表
     *
     * @param query 查询对象
     * @return XyywShoppingCartVo
     */
    TableDataInfo<XyywShoppingCartVo> queryPageList(XyywShoppingCartQuery query);

    /**
     * 查询购物车列表
     *
     * @param query 查询对象
     * @return XyywShoppingCartVo
     */
    List<XyywShoppingCartVo> queryList(XyywShoppingCartQuery query);

    /**
     * 新增购物车
     *
     * @param bo 购物车新增业务对象
     * @return Boolean
     */
    Boolean insertByBo(XyywShoppingCartBo bo);

    /**
     * 修改购物车
     *
     * @param bo 购物车编辑业务对象
     * @return Boolean
     */
    Boolean updateByBo(XyywShoppingCartBo bo);

    /**
     * 校验并批量删除购物车信息
     *
     * @param ids 主键集合
     * @return Boolean
     */
    Boolean deleteWithValidByIds(Collection<Integer> ids);
}
